package com.sian.datasource;

import java.sql.Array;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;

/**
 *@see 封装的主工程类
 *@author desert
 *@version 1.0
 */
public class C1CoreFactory implements C1Factory{
	
	 public C1CoreFactory() {
	
	 }
	 
	
	public Connection getConnection(Connection conn) throws SQLException {
		// TODO Auto-generated method stub
		return new C1Connection(this,conn);
	}
	
	
	public Statement getStatement(Statement statement, C1Connection conn)
			throws SQLException {
		// TODO Auto-generated method stub
		return new C1Statement(this, statement, conn);
	}
	
	
	public PreparedStatement getPreparedStatement(PreparedStatement real,
			C1Connection conn, String p0) throws SQLException {
		// TODO Auto-generated method stub
		return new C1PreparedStatement(this, real, conn, p0);
	}
	

	 public CallableStatement getCallableStatement(CallableStatement real, C1Connection conn, String p0) throws SQLException {
	        return new C1CallableStatement(this, real, conn, p0);
	    }
	    
	    public DatabaseMetaData getDatabaseMetaData(DatabaseMetaData real, C1Connection conn) throws SQLException {
	        return null;
	    }
	    
	    public ResultSet getResultSet(ResultSet real, C1Statement statement, String preparedQuery, String query) throws SQLException {
	        return new C1ResultSet(this, real, statement, preparedQuery, query);
	    }
	    
	    public Array getArray(Array real, C1Statement statement, String preparedQuery, String query) throws SQLException {
	        return new C1Array(this, real, statement, preparedQuery, query);
	    }
	    
	    public ResultSetMetaData getResultSetMetaData(ResultSetMetaData real) throws SQLException {
	        return real;
	    }

		
		public C1Factory getOptions() throws SQLException {
			// TODO Auto-generated method stub
			return null;
		}

}
